package main.java.org.itc2.Presentacion;

import com.opensymphony.xwork2.ActionSupport;

import main.java.org.itc2.Control.Gestor_Tarea;
import main.java.org.itc2.Dominio.Tarea;

public class Interfaz_Tarea extends ActionSupport{

	
	private Tarea plantilla = new Tarea();

	


	
	/**
	 * @return the plantilla
	 */
	public Tarea getPlantilla() {
		return plantilla;
	}

	/**
	 * @param plantilla the plantilla to set
	 */
	public void setPlantilla(Tarea plantilla) {
		this.plantilla = plantilla;
	}

	public String execute() {
		Gestor_Tarea gestor = new Gestor_Tarea();
		if(gestor.anadirTarea(plantilla)){
			return SUCCESS;
		}else{
			return ERROR;
		}
		
	}
	
}